package com.sys.manage.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.sys.api.Controller.ManagerController;
import com.sys.api.Service.ManagerService;
import com.sys.common.ZuelResult;
import com.sys.vo.GetAllUsersVo;

import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/manager")
public class ManagerControllerImpl implements ManagerController {

	@Autowired
	private ManagerService service;
	
	@GetMapping("/changeState")
	@ApiOperation(value="更改用户状态",notes="传id")
	@Override
	public ZuelResult changeState(@RequestParam Integer id) {
		// TODO Auto-generated method stub
		return service.changeState(id);
	}

	@ApiOperation(value="获取所有用户" ,notes="强哥注意这是get请求，没有做分页")
	@GetMapping("/getAllUser")
	@Override
	public GetAllUsersVo getAllUser() {
		// TODO Auto-generated method stub
		return service.getAllUser();
	}
}
